package com.by.yz.adapter;

import android.content.Context;

import com.by.yz.R;
import com.by.yz.common.ViewHolder;
import com.by.yz.entity.Doctorbean;


import java.util.List;

/**
 * Created by mrs yang on 2016/10/26.
 */
public class SearchAdapter extends CommonAdapter<Doctorbean>{

    public SearchAdapter(Context context, List<Doctorbean> data, int layoutId) {
        super(context, data, layoutId);
    }

    @Override
    public void convert(ViewHolder holder, int position) {
        holder.setImageResourse(R.id.avatar,Integer.getInteger(mdata.get(position).getmImageView()))
                .setText(R.id.doctorName,mdata.get(position).getDoctorname())
                .setText(R.id.department,mdata.get(position).getDepartment().getDepartment())
                .setText(R.id.doctorPosition,mdata.get(position).getPosition())
                .setText(R.id.textHospital,mdata.get(position).getTextHospital().getHospital())
                .setText(R.id.textSubDescripting,mdata.get(position).getResume());
    }
}
